/*****************************************************************************
Copyright 2006 Kervin L. Pierre
    EMAIL: otlkcon@adevsoft.com

This file is part of Otlkcon.

Sapimapi is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

Sapimapi is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Sapimapi; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

*******************************************************************************/

#ifndef OTLKCON_PROP2XML
#define OTLKCON_PROP2XML

#define OTLKCON_PROP2XML_TABSPACES  4

#define OTLKCON_OBJ2XML_SHOW_BINARY 1

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <windows.h>
#include <mapi.h>
#include <mapispi.h>

#include <otlkcon_config.h>
#include <otlkcon_base64.h>

HRESULT otlkcon_propValue2xml(LPSPropValue pv, int flags, UINT tabLevel,
            LPALLOCATEBUFFER lpAllocateBuffer, LPALLOCATEMORE lpAllocateMore,
            LPFREEBUFFER lpFreeBuffer, char **strBuff, size_t strBuffSize);

HRESULT otlkcon_row2xml(LPSRow row, int flags, UINT tabLevel,
               LPALLOCATEBUFFER lpAllocateBuffer, LPALLOCATEMORE lpAllocateMore,
               LPFREEBUFFER lpFreeBuffer, char **strBuff, size_t strBuffSize );

HRESULT otlkcon_table2xml(LPMAPITABLE lpTable, LPSPropTagArray propTags, char *id, int flags, 
            UINT tabLevel,LPALLOCATEBUFFER lpAllocateBuffer, LPALLOCATEMORE lpAllocateMore,
            LPFREEBUFFER lpFreeBuffer, char **strBuff, size_t strBuffSize);

HRESULT otlkcon_obj2xml_begin(char **strBuff, size_t strBuffSize);

HRESULT otlkcon_obj2xml_end(char **strBuff, size_t strBuffSize);

#endif /* OTLKCON_PROP2XML */